<!DOCTYPE html>
<html lang="en">
  <head>
    <title>
        CentOS-常用软件安装 - rulerLwx Blog
      </title>
        <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
      content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-transform" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no,email=no,adress=no">
    
    <meta name="theme-color" content="#000000" />
    
    <meta http-equiv="window-target" content="_top" />
    
    
    <meta name="description" content="Java 卸载open-jdk 如果系统安装了open-jdk，需先卸载。 1）查看系统是否安装了open-jdk rpm -qa | grep java 2）用yum方式卸载 # yum remove java-1.8.0-openjdk-headless.x86_64" />
    <meta name="generator" content="Hugo 0.73.0 with theme pure" />
    <title>CentOS-常用软件安装 - rulerLwx Blog</title>
    
    
    <link rel="stylesheet" href="https://rulerLwx.gitee.io/css/style.min.c4bc7071f132c964c2116bca53b392933f377e5ca7b7051ed245187c621a2d3e.css">
    
    <link rel="stylesheet" href="https://cdn.staticfile.org/highlight.js/9.15.10/styles/github.min.css" async>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.4.2/tocbot.css" async>
    <meta property="og:title" content="CentOS-常用软件安装" />
<meta property="og:description" content="Java 卸载open-jdk 如果系统安装了open-jdk，需先卸载。 1）查看系统是否安装了open-jdk rpm -qa | grep java 2）用yum方式卸载 # yum remove java-1.8.0-openjdk-headless.x86_64" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://rulerLwx.gitee.io/2020/07/centos-%E5%B8%B8%E7%94%A8%E8%BD%AF%E4%BB%B6%E5%AE%89%E8%A3%85/" />
<meta property="article:published_time" content="2020-07-01T18:58:47+08:00" />
<meta property="article:modified_time" content="2020-07-01T18:58:47+08:00" />
<meta itemprop="name" content="CentOS-常用软件安装">
<meta itemprop="description" content="Java 卸载open-jdk 如果系统安装了open-jdk，需先卸载。 1）查看系统是否安装了open-jdk rpm -qa | grep java 2）用yum方式卸载 # yum remove java-1.8.0-openjdk-headless.x86_64">
<meta itemprop="datePublished" content="2020-07-01T18:58:47&#43;08:00" />
<meta itemprop="dateModified" content="2020-07-01T18:58:47&#43;08:00" />
<meta itemprop="wordCount" content="1973">



<meta itemprop="keywords" content="," /><meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="CentOS-常用软件安装"/>
<meta name="twitter:description" content="Java 卸载open-jdk 如果系统安装了open-jdk，需先卸载。 1）查看系统是否安装了open-jdk rpm -qa | grep java 2）用yum方式卸载 # yum remove java-1.8.0-openjdk-headless.x86_64"/>

    <!--[if lte IE 9]>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/classlist/1.1.20170427/classList.min.js"></script>
      <![endif]-->

    <!--[if lt IE 9]>
        <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
      <![endif]-->
  </head>

  
  

  <body class="main-center theme-black" itemscope itemtype="http://schema.org/WebPage"><header class="header" itemscope itemtype="http://schema.org/WPHeader">
    <div class="slimContent">
      <div class="navbar-header">
        <div class="profile-block text-center">
          <a id="avatar" href="https://gitee.com/rulerLwx" target="_blank">
            <img class="img-circle img-rotate" src="https://rulerLwx.gitee.io/avatar.png" width="200" height="200">
          </a>
          <h2 id="name" class="hidden-xs hidden-sm">rulerLwx</h2>
          <h3 id="title" class="hidden-xs hidden-sm hidden-md">thinking...</h3>
          <small id="location" class="text-muted hidden-xs hidden-sm"><i class="icon icon-map-marker"></i>Guangzhou, China</small>
        </div><div class="search" id="search-form-wrap">
    <form class="search-form sidebar-form">
        <div class="input-group">
            <input type="text" class="search-form-input form-control" placeholder="Search" />
            <span class="input-group-btn">
                <button type="submit" class="search-form-submit btn btn-flat" onclick="return false;"><i
                        class="icon icon-search"></i></button>
            </span>
        </div>
        <div class="ins-search">
            <div class="ins-search-mask"></div>
            <div class="ins-search-container">
                <div class="ins-input-wrapper">
                    <input type="text" class="ins-search-input" placeholder="Type something..."
                        x-webkit-speech />
                    <button type="button" class="close ins-close ins-selectable" data-dismiss="modal"
                        aria-label="Close"><span aria-hidden="true">×</span></button>
                </div>
                <div class="ins-section-wrapper">
                    <div class="ins-section-container"></div>
                </div>
            </div>
        </div>
    </form>
</div>
        <button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target="#main-navbar" aria-controls="main-navbar" aria-expanded="false">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
      </div>
      <nav id="main-navbar" class="collapse navbar-collapse" itemscope itemtype="http://schema.org/SiteNavigationElement" role="navigation">
        <ul class="nav navbar-nav main-nav">
            <li class="menu-item menu-item-home">
                <a href="/">
                    <i class="icon icon-home-fill"></i>
                  <span class="menu-title">Home</span>
                </a>
            </li>
            <li class="menu-item menu-item-archives">
                <a href="/posts/">
                    <i class="icon icon-archives-fill"></i>
                  <span class="menu-title">Archives</span>
                </a>
            </li>
            <li class="menu-item menu-item-categories">
                <a href="/categories/">
                    <i class="icon icon-folder"></i>
                  <span class="menu-title">Categories</span>
                </a>
            </li>
            <li class="menu-item menu-item-tags">
                <a href="/tags/">
                    <i class="icon icon-tags"></i>
                  <span class="menu-title">Tags</span>
                </a>
            </li>
            <li class="menu-item menu-item-about">
                <a href="/about/">
                    <i class="icon icon-cup-fill"></i>
                  <span class="menu-title">About</span>
                </a>
            </li>
        </ul>
      </nav>
    </div>
  </header>

<aside class="sidebar" itemscope itemtype="http://schema.org/WPSideBar">
  <div class="slimContent">
    
      <div class="widget">
    <h3 class="widget-title">Board</h3>
    <div class="widget-body">
        <div id="board">
            <div class="content">enjoy~
            </div>
        </div>
    </div>
</div>

      <div class="widget">
    <h3 class="widget-title"> Categories</h3>
    <div class="widget-body">
        <ul class="category-list">
            <li class="category-list-item"><a href="https://rulerLwx.gitee.io/categories/java-framework/" class="category-list-link">java-framework</a><span class="category-list-count">38</span></li>
            <li class="category-list-item"><a href="https://rulerLwx.gitee.io/categories/java-front-end/" class="category-list-link">java-front-end</a><span class="category-list-count">11</span></li>
            <li class="category-list-item"><a href="https://rulerLwx.gitee.io/categories/java-se/" class="category-list-link">java-se</a><span class="category-list-count">21</span></li>
            <li class="category-list-item"><a href="https://rulerLwx.gitee.io/categories/java-senior/" class="category-list-link">java-senior</a><span class="category-list-count">4</span></li>
            <li class="category-list-item"><a href="https://rulerLwx.gitee.io/categories/linux/" class="category-list-link">linux</a><span class="category-list-count">13</span></li>
            <li class="category-list-item"><a href="https://rulerLwx.gitee.io/categories/tools/" class="category-list-link">tools</a><span class="category-list-count">1</span></li>
            <li class="category-list-item"><a href="https://rulerLwx.gitee.io/categories/%E6%8A%80%E6%9C%AF%E6%9D%82%E7%83%A9/" class="category-list-link">技术杂烩</a><span class="category-list-count">4</span></li>
            <li class="category-list-item"><a href="https://rulerLwx.gitee.io/categories/%E6%95%B0%E6%8D%AE%E5%BA%93/" class="category-list-link">数据库</a><span class="category-list-count">15</span></li>
        </ul>
    </div>
</div>
      <div class="widget">
    <h3 class="widget-title"> Tags</h3>
    <div class="widget-body">
        <ul class="tag-list">
            
            
            <li class="tag-list-item"><a href="https://rulerLwx.gitee.io/tags/jvm/" class="tag-list-link">jvm</a><span
                    class="tag-list-count">1</span></li>
            
            
            <li class="tag-list-item"><a href="https://rulerLwx.gitee.io/tags/%E5%A4%9A%E7%BA%BF%E7%A8%8B/" class="tag-list-link">多线程</a><span
                    class="tag-list-count">2</span></li>
            
            
            <li class="tag-list-item"><a href="https://rulerLwx.gitee.io/tags/%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B/" class="tag-list-link">网络编程</a><span
                    class="tag-list-count">3</span></li>
            
        </ul>

    </div>
</div>
      
<div class="widget">
    <h3 class="widget-title">Recent Posts</h3>
    <div class="widget-body">
        <ul class="recent-post-list list-unstyled no-thumbnail">
            <li>
                <div class="item-inner">
                    <p class="item-title">
                        <a href="https://rulerLwx.gitee.io/2020/07/%E8%87%AA%E5%B7%B1%E5%8A%A8%E6%89%8B%E4%B8%80%E6%89%B9%E9%87%8F%E7%A7%BB%E5%8A%A8%E9%87%8D%E5%91%BD%E5%90%8D%E6%96%87%E4%BB%B6/" class="title">自己动手（一）——批量移动、重命名文件</a>
                    </p>
                    <p class="item-date">
                        <time datetime="2020-07-27 17:50:02 &#43;0800 CST" itemprop="datePublished">2020-07-27</time>
                    </p>
                </div>
            </li>
            <li>
                <div class="item-inner">
                    <p class="item-title">
                        <a href="https://rulerLwx.gitee.io/2020/07/%E5%85%B3%E4%BA%8Einteger%E7%9A%84-128~127%E7%BC%93%E5%AD%98/" class="title">关于Integer的 -128~127缓存</a>
                    </p>
                    <p class="item-date">
                        <time datetime="2020-07-11 16:56:21 &#43;0800 CST" itemprop="datePublished">2020-07-11</time>
                    </p>
                </div>
            </li>
            <li>
                <div class="item-inner">
                    <p class="item-title">
                        <a href="https://rulerLwx.gitee.io/2020/07/%E8%B7%A8%E5%9F%9F%E9%97%AE%E9%A2%98/" class="title">跨域问题</a>
                    </p>
                    <p class="item-date">
                        <time datetime="2020-07-08 22:41:12 &#43;0800 CST" itemprop="datePublished">2020-07-08</time>
                    </p>
                </div>
            </li>
            <li>
                <div class="item-inner">
                    <p class="item-title">
                        <a href="https://rulerLwx.gitee.io/2020/07/%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA/" class="title">个人博客搭建</a>
                    </p>
                    <p class="item-date">
                        <time datetime="2020-07-05 18:58:47 &#43;0800 CST" itemprop="datePublished">2020-07-05</time>
                    </p>
                </div>
            </li>
            <li>
                <div class="item-inner">
                    <p class="item-title">
                        <a href="https://rulerLwx.gitee.io/2020/07/centos/" class="title">CentOS-</a>
                    </p>
                    <p class="item-date">
                        <time datetime="2020-07-01 18:58:47 &#43;0800 CST" itemprop="datePublished">2020-07-01</time>
                    </p>
                </div>
            </li>
        </ul>
    </div>
</div>
  </div>
</aside>

    
    
<aside class="sidebar sidebar-toc collapse" id="collapseToc" itemscope itemtype="http://schema.org/WPSideBar">
  <div class="slimContent">
    <h4 class="toc-title">Catalogue</h4>
    <nav id="toc" class="js-toc toc">

    </nav>
  </div>
</aside>
<main class="main" role="main"><div class="content">
  <article id="-" class="article article-type-" itemscope
    itemtype="http://schema.org/BlogPosting">
    
    <div class="article-header">
      <h1 itemprop="name">
  <a
    class="article-title"
    href="/2020/07/centos-%E5%B8%B8%E7%94%A8%E8%BD%AF%E4%BB%B6%E5%AE%89%E8%A3%85/"
    >CentOS-常用软件安装</a
  >
</h1>

      <div class="article-meta">
        
<span class="article-date">
  <i class="icon icon-calendar-check"></i>&nbsp;
<a href="https://rulerLwx.gitee.io/2020/07/centos-%E5%B8%B8%E7%94%A8%E8%BD%AF%E4%BB%B6%E5%AE%89%E8%A3%85/" class="article-date">
  <time datetime="2020-07-01 18:58:47 &#43;0800 CST" itemprop="datePublished">2020-07-01</time>
</a>
</span>
<span class="article-category">
  <i class="icon icon-folder"></i>&nbsp;
  <a class="article-category-link" href="/categories/linux/"> Linux </a>
</span>  
  <span class="article-tag">
    <i class="icon icon-tags"></i>&nbsp;
    <a class="article-tag-link" href="/tags//">  </a>
  </span>

        <span class="post-comment"><i class="icon icon-comment"></i>&nbsp;<a href="/2020/07/centos-%E5%B8%B8%E7%94%A8%E8%BD%AF%E4%BB%B6%E5%AE%89%E8%A3%85/#comments"
            class="article-comment-link">Comments</a></span>
		<span class="post-wordcount hidden-xs" itemprop="wordCount">Word Count: 1973words</span>
		<span class="post-readcount hidden-xs" itemprop="timeRequired">Read Count: 4minutes </span>
      </div>
    </div>
    <div class="article-entry marked-body js-toc-content" itemprop="articleBody">
      <h1 id="java">Java</h1>
<h2 id="卸载open-jdk">卸载open-jdk</h2>
<p>如果系统安装了open-jdk，需先卸载。</p>
<p>1）查看系统是否安装了open-jdk <code>rpm -qa | grep java</code></p>
<p><img src="https://gitee.com/rulerLwx/PicGo/raw/master/img-07/20200708160816.png" alt=""></p>
<p>2）用yum方式卸载 <code># yum remove java-1.8.0-openjdk-headless.x86_64</code></p>
<h2 id="安装在当前用户下">安装在当前用户下</h2>
<p>假设用户为tset</p>
<p>1）新建Java文件夹<code>/home/test/Java</code></p>
<p>2）复制<code>jdk-8u201-linux-x64.tar.gz</code>到<code>/home/test/Java</code></p>
<p>3）进入Java文件夹，解压<code>tar -zxvf jdk-8u201-linux-x64.tar.gz</code>，删除tar文件<code>rm jdk-8u201-linux-x64.tar.gz</code></p>
<p>4）配置环境变量</p>
<p>编辑<code>/home/test</code>下的<code>.bash_profile</code>，在文件末尾添加两行配置：</p>
<p><img src="https://gitee.com/rulerLwx/PicGo/raw/master/img-07/20200708161132.png" alt=""></p>
<h2 id="安装在root用户下">安装在root用户下</h2>
<p>root用户的jdk一般安装在<code>/usr/java</code>目录</p>
<p>root用户的环境变量配置，编辑<code>/etc/profile</code>，在末尾添加配置（跟test用户的配置相同）</p>
<p>PS：若root用户没安装jdk，在root用户下<code>java -version</code>也能查看到test用户安装的jdk，TODO&hellip;</p>
<h1 id="tomcat">Tomcat</h1>
<h2 id="安装">安装</h2>
<p>前提：安装Tomcat之前，必须检查是否配置了Java环境（JAVA_HOME），Tomcat版本跟Java版位数（32 or 64）要相同。</p>
<p>下载tar包，放到相应目录，解压、运行即可。</p>
<h2 id="配置开机启动">配置开机启动</h2>
<p>1）<code>vim /etc/rc.d/rc.local</code>增加如下配置</p>
<pre><code>export JAVA_HOME=/home/test/Java/jdk1.8.0_201
/home/test/Tomcat/apache-tomcat-9.0.17/bin/startup.sh start
</code></pre>
<p>如下：</p>
<p><img src="https://gitee.com/rulerLwx/PicGo/raw/master/img-07/20200708161152.png" alt=""></p>
<p>2）将rc.local修改为可执行 <code>chmod 777 /etc/rc.d/rc.local</code></p>
<p>参考：https://www.cnblogs.com/jiuyue-flamen/p/6818022.html</p>
<h1 id="redis">Redis</h1>
<h2 id="传智播客-php2015-redis视频教程">传智播客-PHP2015-Redis视频教程</h2>
<p>创建redis目录，上传文件并解压</p>
<pre><code># mkdir /home/jinnan/rdtar

# cd /home/jinnan/rdtar
# tar zxvf redis-2.6.14.tar.gz
</code></pre>
<p>执行make命令</p>
<pre><code># cd /home/jinnan/rdtar/redis-2.6.14
# make
</code></pre>
<p>创建/usr/local/redis运行目录，并给其copy两个执行文件、一个配置文件到此目录</p>
<pre><code># mkdir /usr/local/redis
# cp redis.conf /usr/local/redis
# cd src
# cp redis-cli redis-server /usr/local/redis
</code></pre>
<p>修改redis.conf配置文件，设置后台启动redis</p>
<pre><code>deamonize yes
</code></pre>
<p>带着redis.conf配置文件，在后台启动redis服务</p>
<p><img src="https://gitee.com/rulerLwx/PicGo/raw/master/img-07/20200708161212.png" alt=""></p>
<p>此处没有设置redis开机启动，参考 数据库/Redis.md</p>
<h1 id="mysql">MySQL</h1>
<h2 id="安装generic-binaries">安装（Generic Binaries）</h2>
<ul>
<li>下载：mysql-5.5.57-linux-glibc2.12-x86_64.tar.gz</li>
<li>解压：tar xzvf mysql-5.5.57-linux-glibc2.12-x86_64.tar.gz</li>
<li>mv mysql-5.5.57-linux-glibc2.12-x86_64 /usr/local/mysql -r</li>
<li>创建组和用户：<code>groupadd mysql</code>,<code>useradd -r -g mysql mysql</code></li>
<li>安装数据库</li>
</ul>
<pre><code class="language-sh">cd /usr/local/mysql     # 进入安装mysql软件目录
chown -R mysql:mysql ./ # 修改当前目录拥有者为mysql用户
./scripts/mysql_install_db --user=mysql     # 安装数据库
chown -R root:root ./       # 修改当前目录拥有者为root用户
chown -R mysql:mysql data   # 修改当前data目录拥有者为mysql用户

cp support-files/mysql.server /etc/init.d/mysql     # 添加开机启动脚本
chkconfig --add mysql       # 添加开机启动服务，将执行上面的脚本，，，这是开机自启的重点

修改mysql启动时的参数：
-----------------------------------------------
[root@localhost software]# vim /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

[mysqld_safe]
# log-error=/var/log/mariadb/mariadb.log    # 这是原来的配置
# pid-file=/var/run/mariadb/mariadb.pid     # 这是原来的配置
log-error=/var/log/mysql/mysql.log      # 修改后的配置，不修改的话，mysql用户
                                        # 访问不到 /var/log/mariadb/mariadb.log，因此不能启动数据库实例
pid-file=/var/run/mysql/mysql.pid       # 修改后的配置

!includedir /etc/my.cnf.d
-----------------------------------------------

另外，要建立一个软链接，防止异常：Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
ls -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

service mysql start/stop     # 手动启动数据库服务
ps -ef|grep mysql       # 查看mysql数据库进程是否已启动

</code></pre>
<ul>
<li>./bin/mysqladmin -u root password &lsquo;密码&rsquo;    # 修改数据库用户密码 ，或 alter user system identified by 123456;</li>
<li>ln -s /usr/local/mysql/bin/mysql /usr/local/bin/mysql     # 将mysql客户端放到默认路径</li>
<li>mysql -uroot -p   # 登录数据库，验证是否安装成功</li>
</ul>
<p>注意：/etc/my.cnf.d 可以配置很多参数。可以参看官网或《CentOS7系统管理与运维实战》。</p>
<p>参考的资料：</p>
<ul>
<li><a href="http://www.cnblogs.com/fnlingnzb-learner/p/5830622.html">Linux下安装mysql</a></li>
<li><a href="http://blog.csdn.net/ixidof/article/details/5958904/">Can&rsquo;t connect to local MySQL server through socket &lsquo;/tmp/mysql.sock&rsquo; (2)</a></li>
<li><a href="http://www.cnblogs.com/fnlingnzb-learner/p/5832917.html">Linux下Mysql自启动</a></li>
</ul>
<h2 id="远程连接">远程连接</h2>
<ul>
<li>
<p><del>修改 /etc/my.cnf，增加 bind-address = 0.0.0.0</del></p>
</li>
<li>
<p>登录mysql，并进行如下设置</p>
</li>
</ul>
<pre><code class="language-sh">mysql&gt; grant all privileges  on *.* to root@'%' identified by &quot;root&quot;;
Query OK, 0 rows affected (0.01 sec)

mysql&gt; flush privileges;
Query OK, 0 rows affected (0.00 sec)

</code></pre>
<ul>
<li>关闭linux的防火墙或修改防火墙配置</li>
</ul>
<pre><code class="language-sh">开启防火墙：
1、查看端口开启情况，若之前没有配过会显示 no 说明 3306 端口未开放，反之 yes 说明已开放直接可用 Mysql 客户端远程访问！
$ sudo firewall-cmd --query-port=3306/tcp  
no

2、临时性开启 3306 端口
$ sudo firewall-cmd --add-port=3306/tcp  
success 

3、永久性开启 3306 端口
$ sudo firewall-cmd --permanent --zone=public --add-port=3306/tcp  
success  
$ sudo firewall-cmd --reload #重新加载配置  
success  
[john@localhost ~]$ sudo firewall-cmd --zone=public --list-all #查看添加结果  
public (default, active)  
  interfaces: eth0  
  sources:   
  services: dhcpv6-client ssh  
  ports: 3306/tcp 22/tcp  
  masquerade: no  
  forward-ports:   
  icmp-blocks:   
  rich rules: 
</code></pre>
<p>以上防火墙设置只对 CentOS7.</p>
<p>注意：<code>firewall-cmd</code>是一个完整的命令，而不是 firewall cmd.</p>
<p>删除一个端口：
<code>sudo firewall-cmd --permanent --zone=public --remove-port=3306/tcp</code>，<code>firewall-cmd --reload #重新加载配置</code>。</p>
<p>参考：<a href="http://blog.csdn.net/johnnycode/article/details/40783553"> Mysql 安装(Using Generic Binaries)</a> 之 Mysql远程连接 与 防火墙开启</p>
<h1 id="正则表达式终端测试工具">正则表达式终端测试工具</h1>
<pre><code class="language-shell"># yum install -y pcre-tools
</code></pre>
<p>如何使用？</p>
<ul>
<li>re：输入正则表达式，//表示开头和结束</li>
<li>data：测试的数据</li>
</ul>
<pre><code>[root@localhost ~]# pcretest 
PCRE version 8.32 2012-11-30

  re&gt; /(\d+)\.(\d+)\.(\d+)\.(\d+)/
data&gt; 192.168.12.133
 0: 192.168.12.133
 1: 192
 2: 168
 3: 12
 4: 133
</code></pre>
<p>参考：https://www.bilibili.com/video/av55251610?p=55</p>
<h1 id="其它">其它</h1>
<pre><code>yum -y install vim
yum -y install net-tools
yum -y install psmisc

yum -y install git

yum install -y bash-completion #命令自动补齐，安装后，需要退出编辑器后重进就正常了

yum -y install initscripts # bash: ip command not found

yum install -y wget
</code></pre>

    </div>
    <div class="article-footer">
<blockquote class="mt-2x">
  <ul class="post-copyright list-unstyled">
    <li class="post-copyright-link hidden-xs">
      <strong>Permalink: </strong>
      <a href="https://rulerLwx.gitee.io/2020/07/centos-%E5%B8%B8%E7%94%A8%E8%BD%AF%E4%BB%B6%E5%AE%89%E8%A3%85/" title="CentOS-常用软件安装" target="_blank" rel="external">https://rulerLwx.gitee.io/2020/07/centos-%E5%B8%B8%E7%94%A8%E8%BD%AF%E4%BB%B6%E5%AE%89%E8%A3%85/</a>
    </li>
    <li class="post-copyright-license">
      <strong>License：</strong><a href="http://creativecommons.org/licenses/by/4.0/deed.zh" target="_blank" rel="external">CC BY 4.0 CN</a>
    </li>
  </ul>
</blockquote>

<div class="panel panel-default panel-badger">
  <div class="panel-body">
    <figure class="media">
      <div class="media-left">
        <a href="https://gitee.com/rulerLwx" target="_blank" class="img-burn thumb-sm visible-lg">
          <img src="https://rulerLwx.gitee.io/avatar.png" class="img-rounded w-full" alt="">
        </a>
      </div>
      <div class="media-body">
        <h3 class="media-heading"><a href="https://gitee.com/rulerLwx" target="_blank"><span class="text-dark">rulerLwx</span><small class="ml-1x">thinking...</small></a></h3>
        <div>Good Good Study, Day Day Up~</div>
      </div>
    </figure>
  </div>
</div>
    </div>
  </article>
<section id="comments">
    <div id="vcomments"></div>
</section>

</div><nav class="bar bar-footer clearfix" data-stick-bottom>
    <div class="bar-inner">
        <ul class="pager pull-left">
            <li class="prev">
                <a href="https://rulerLwx.gitee.io/2020/07/centos-%E7%94%9F%E4%BA%A7%E7%8E%AF%E5%A2%83/" title="CentOS-生产环境"><i
                        class="icon icon-angle-left"
                        aria-hidden="true"></i><span>&nbsp;&nbsp;Older</span></a>
            </li>
            <li class="next">
                <a href="https://rulerLwx.gitee.io/2020/07/centos-%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/"
                    title="CentOS-常用命令"><span>Newer&nbsp;&nbsp;</span><i
                        class="icon icon-angle-right" aria-hidden="true"></i></a>
            </li>
            
            <li class="toggle-toc">
                <a class="toggle-btn collapsed" data-toggle="collapse" href="#collapseToc" aria-expanded="false"
                    title="Catalogue" role="button">
                    <span>[&nbsp;</span><span>Catalogue</span>
                    <i class="text-collapsed icon icon-anchor"></i>
                    <i class="text-in icon icon-close"></i>
                    <span>]</span>
                </a>
            </li>
        </ul>
        <div class="bar-right">
            <div class="share-component" data-sites="weibo,qq,wechat"
                data-mobile-sites="weibo,qq,qzone"></div>
        </div>
    </div>
</nav>

</main><footer class="footer" itemscope itemtype="http://schema.org/WPFooter">
<ul class="social-links">
    <li><a href="https://gitee.com/rulerLwx" target="_blank" title="gitee" data-toggle=tooltip data-placement=top >
            <i class="icon icon-gitee"></i></a></li>
    <li><a href="https://github.com/wolf-lea" target="_blank" title="github" data-toggle=tooltip data-placement=top >
            <i class="icon icon-github"></i></a></li>
</ul>
  <div class="copyright">
    &copy;2020  -
    2020
    <div class="publishby">
        Theme by <a href="https://github.com/xiaoheiAh" target="_blank"> xiaoheiAh </a>base on<a href="https://github.com/xiaoheiAh/hugo-theme-pure" target="_blank"> pure</a>.
    </div>
  </div>
</footer>

<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_SVG"></script>
<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
            showMathMenu: false, //disables context menu
            tex2jax: {
            inlineMath: [ ['$','$'], ['\\(','\\)'] ]
           }
    });
</script>


<script src="https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.min.js"></script>
<script>
    window.jQuery || document.write('<script src="js/jquery.min.js"><\/script>')
</script>
<script type="text/javascript" src="https://cdn.staticfile.org/highlight.js/9.15.10/highlight.min.js"></script>
<script type="text/javascript" src="https://cdn.staticfile.org/highlight.js/9.15.10/languages/python.min.js" defer></script>
<script type="text/javascript" src="https://cdn.staticfile.org/highlight.js/9.15.10/languages/javascript.min.js" defer></script><script>
    hljs.configure({
        tabReplace: '    ', 
        classPrefix: ''     
        
    })
    hljs.initHighlightingOnLoad();
</script>
<script src="https://rulerLwx.gitee.io/js/application.min.bdeb64b910570b6c41badc6a05b7afb0c8ad9efd8525de3c7257d59e786326a3.js"></script>
<script src="https://rulerLwx.gitee.io/js/plugin.min.51ff8c7317566f82259170fa36e09c4493adc9b9378b427a01ad3f017ebac7dd.js"></script>

<script>
    (function (window) {
        var INSIGHT_CONFIG = {
            TRANSLATION: {
                POSTS: 'Posts',
                PAGES: 'Pages',
                CATEGORIES: 'Categories',
                TAGS: 'Tags',
                UNTITLED: '(Untitled)',
            },
            ROOT_URL: 'https:\/\/rulerLwx.gitee.io',
            CONTENT_URL: 'https:\/\/rulerLwx.gitee.io\/searchindex.json ',
        };
        window.INSIGHT_CONFIG = INSIGHT_CONFIG;
    })(window);
</script>
<script type="text/javascript" src="https://rulerLwx.gitee.io/js/insight.min.a343cd9a5a7698336b28ef3a7c16a3a1b1d2d5fb17dc8ed04022bbe08cc5459073a15bdafa3a8a58cdd56080784bdd69fa70b1ae8597565c799c57ed00f0e120.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.4.2/tocbot.min.js"></script>
<script>
    tocbot.init({
        
        tocSelector: '.js-toc',
        
        contentSelector: '.js-toc-content',
        
        headingSelector: 'h1, h2, h3',
        
        hasInnerContainers: true,
    });
</script>

<script src="https://cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/valine"></script>
<script type="text/javascript">
    var GUEST = ['nick', 'mail', 'link'];
    var meta = 'nick,mail';
    meta = meta.split(',').filter(function (item) {
        return GUEST.indexOf(item) > -1;
    });
    new Valine({
        el: '#vcomments',
        verify: null ,
        notify: null ,
        appId: 'IyAB0PSPRazTPDxitO1ddQ7O-gzGzoHsz',
        appKey: '5rBJTq4KidYF33eXwvRVhtEH',
        placeholder: 'enjoy~',
        avatar: 'mm',
        meta: meta,
        pageSize: '10' || 10,
        visitor: false 
});
</script>

  </body>
</html>
